<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8"/>
    <title>mkfree-deploy</title>
    <link rel="stylesheet" href="/index.css"/>
    <script>
        var API_HOST = '';
    </script>
</head>
<body>

<div id="root"></div>

<script src="/index.js"></script>
<script type="text/javascript">
    if (location.pathname !== '/deploy/install') {
        fetch(API_HOST + '/api/installed').then(response => response.json())
            .then(result => {
                const data = result.data;
                if (!data.installed) {
                    location.replace('/deploy/install');
                }

                localStorage.setItem("domain", data.domain);
            })
            .catch(e => console.log("Oops, error", e))
    }
</script>
</body>
</html>
